﻿#region copyright info
//------------------------------------------------------------------------------
// <copyright company="ChaosStudio">
//     Copyright (c) 2002-2010 巧思工作室.  All rights reserved.
//     Contact:		MSN:zhouyu@cszi.com , QQ:478779122
//		Link:				http://www.69sea.com http://www.cszi.com
// </copyright>
//------------------------------------------------------------------------------
#endregion

using System;
using System.Collections.Generic;
using System.Net;

namespace CS.Util.Environment
{
    /// <summary>
    ///   宿主主机相关信息
    /// </summary>
    /// 
    /// <description class = "CS.Util.Environment.Host">
    ///   
    /// </description>
    /// 
    /// <history>
    ///   2010-9-14 9:46:03 , zhouyu ,  创建	     
    ///  </history>
    public class Host
    {

        /// <summary>
        /// 当前应用程序的基础路径
        /// </summary>
        public static string AppBaseDirectory
        {
            get { return AppDomain.CurrentDomain.BaseDirectory; }
        }

        private static string[] _ip;
        public static string[] Ip
        {
            get
            {
                //if(_ip == null)
                //{
                //var me = Dns.GetHostAddresses(Dns.GetHostName());
                //    string[] ips = new string[me.Length];
                //    foreach (var ipAddress in me)
                //    {
                //        ips.Add(ipAddress.ToString());
                //    }
                //    _ip = ips.
                //}
                return _ip;
            }
        }

    }
}
